typedef struct stack{
int index;
char vals[10001];
}stack;

void append(char val, stack *stk){
    stk->index ++;
    stk->vals[stk->index] = val;
}

int pop(stack *stk){
    return stk->index==0?-1:(stk->index)--;
}